3.92 \(\int \frac{\tan ^3(x)}{a+b \cos ^3(x)} \, dx\)

Optimal. Leaf size=153 \[ -\frac{b^{2/3} \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cos (x)+b^{2/3} \cos ^2(x)\right )}{6 a^{5/3}}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cos (x)\right )}{3 a^{5/3}}-\frac{b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{a}-2 \sqrt [3]{b} \cos (x)}{\sqrt{3} \sqrt [3]{a}}\right )}{\sqrt{3} a^{5/3}}-\frac{\log \left (a+b \cos ^3(x)\right )}{3 a}+\frac{\sec ^2(x)}{2 a}+\frac{\log (\cos (x))}{a} \]

[Out]

-((b^(2/3)*ArcTan[(a^(1/3) - 2*b^(1/3)*Cos[x])/(Sqrt[3]*a^(1/3))])/(Sqrt[3]*a^(5/3))) + Log[Cos[x]]/a + (b^(2/
3)*Log[a^(1/3) + b^(1/3)*Cos[x]])/(3*a^(5/3)) - (b^(2/3)*Log[a^(2/3) - a^(1/3)*b^(1/3)*Cos[x] + b^(2/3)*Cos[x]
^2])/(6*a^(5/3)) - Log[a + b*Cos[x]^3]/(3*a) + Sec[x]^2/(2*a)

________________________________________________________________________________________

Rubi [A]  time = 0.196729, antiderivative size = 153, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 10, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.667, Rules used = {3230, 1834, 1871, 200, 31, 634, 617, 204, 628, 260} \[ -\frac{b^{2/3} \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cos (x)+b^{2/3} \cos ^2(x)\right )}{6 a^{5/3}}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cos (x)\right )}{3 a^{5/3}}-\frac{b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{a}-2 \sqrt [3]{b} \cos (x)}{\sqrt{3} \sqrt [3]{a}}\right )}{\sqrt{3} a^{5/3}}-\frac{\log \left (a+b \cos ^3(x)\right )}{3 a}+\frac{\sec ^2(x)}{2 a}+\frac{\log (\cos (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]^3/(a + b*Cos[x]^3),x]

[Out]

-((b^(2/3)*ArcTan[(a^(1/3) - 2*b^(1/3)*Cos[x])/(Sqrt[3]*a^(1/3))])/(Sqrt[3]*a^(5/3))) + Log[Cos[x]]/a + (b^(2/
3)*Log[a^(1/3) + b^(1/3)*Cos[x]])/(3*a^(5/3)) - (b^(2/3)*Log[a^(2/3) - a^(1/3)*b^(1/3)*Cos[x] + b^(2/3)*Cos[x]
^2])/(6*a^(5/3)) - Log[a + b*Cos[x]^3]/(3*a) + Sec[x]^2/(2*a)

Rule 3230

Int[((a_) + (b_.)*((c_.)*sin[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With
[{ff = FreeFactors[Sin[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*(a + b*(c*ff*x)^n)^p)/(1 - ff^2*x^2)^(
(m + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && ILtQ[(m - 1)/2, 0]

Rule 1834

Int[((Pq_)*((c_.)*(x_))^(m_.))/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegrand[((c*x)^m*Pq)/(a + b*
x^n), x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IntegerQ[n] &&  !IGtQ[m, 0]

Rule 1871

Int[(P2_)/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{A = Coeff[P2, x, 0], B = Coeff[P2, x, 1], C = Coeff[P2, x,
 2]}, Int[(A + B*x)/(a + b*x^3), x] + Dist[C, Int[x^2/(a + b*x^3), x], x] /; EqQ[a*B^3 - b*A^3, 0] ||  !Ration
alQ[a/b]] /; FreeQ[{a, b}, x] && PolyQ[P2, x, 2]

Rule 200

Int[((a_) + (b_.)*(x_)^3)^(-1), x_Symbol] :> Dist[1/(3*Rt[a, 3]^2), Int[1/(Rt[a, 3] + Rt[b, 3]*x), x], x] + Di
st[1/(3*Rt[a, 3]^2), Int[(2*Rt[a, 3] - Rt[b, 3]*x)/(Rt[a, 3]^2 - Rt[a, 3]*Rt[b, 3]*x + Rt[b, 3]^2*x^2), x], x]
 /; FreeQ[{a, b}, x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{\tan ^3(x)}{a+b \cos ^3(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1-x^2}{x^3 \left (a+b x^3\right )} \, dx,x,\cos (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{1}{a x^3}-\frac{1}{a x}+\frac{b \left (-1+x^2\right )}{a \left (a+b x^3\right )}\right ) \, dx,x,\cos (x)\right )\\ &=\frac{\log (\cos (x))}{a}+\frac{\sec ^2(x)}{2 a}-\frac{b \operatorname{Subst}\left (\int \frac{-1+x^2}{a+b x^3} \, dx,x,\cos (x)\right )}{a}\\ &=\frac{\log (\cos (x))}{a}+\frac{\sec ^2(x)}{2 a}+\frac{b \operatorname{Subst}\left (\int \frac{1}{a+b x^3} \, dx,x,\cos (x)\right )}{a}-\frac{b \operatorname{Subst}\left (\int \frac{x^2}{a+b x^3} \, dx,x,\cos (x)\right )}{a}\\ &=\frac{\log (\cos (x))}{a}-\frac{\log \left (a+b \cos ^3(x)\right )}{3 a}+\frac{\sec ^2(x)}{2 a}+\frac{b \operatorname{Subst}\left (\int \frac{1}{\sqrt [3]{a}+\sqrt [3]{b} x} \, dx,x,\cos (x)\right )}{3 a^{5/3}}+\frac{b \operatorname{Subst}\left (\int \frac{2 \sqrt [3]{a}-\sqrt [3]{b} x}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx,x,\cos (x)\right )}{3 a^{5/3}}\\ &=\frac{\log (\cos (x))}{a}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cos (x)\right )}{3 a^{5/3}}-\frac{\log \left (a+b \cos ^3(x)\right )}{3 a}+\frac{\sec ^2(x)}{2 a}-\frac{b^{2/3} \operatorname{Subst}\left (\int \frac{-\sqrt [3]{a} \sqrt [3]{b}+2 b^{2/3} x}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx,x,\cos (x)\right )}{6 a^{5/3}}+\frac{b \operatorname{Subst}\left (\int \frac{1}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx,x,\cos (x)\right )}{2 a^{4/3}}\\ &=\frac{\log (\cos (x))}{a}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cos (x)\right )}{3 a^{5/3}}-\frac{b^{2/3} \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cos (x)+b^{2/3} \cos ^2(x)\right )}{6 a^{5/3}}-\frac{\log \left (a+b \cos ^3(x)\right )}{3 a}+\frac{\sec ^2(x)}{2 a}+\frac{b^{2/3} \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1-\frac{2 \sqrt [3]{b} \cos (x)}{\sqrt [3]{a}}\right )}{a^{5/3}}\\ &=-\frac{b^{2/3} \tan ^{-1}\left (\frac{1-\frac{2 \sqrt [3]{b} \cos (x)}{\sqrt [3]{a}}}{\sqrt{3}}\right )}{\sqrt{3} a^{5/3}}+\frac{\log (\cos (x))}{a}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cos (x)\right )}{3 a^{5/3}}-\frac{b^{2/3} \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cos (x)+b^{2/3} \cos ^2(x)\right )}{6 a^{5/3}}-\frac{\log \left (a+b \cos ^3(x)\right )}{3 a}+\frac{\sec ^2(x)}{2 a}\\ \end{align*}

Mathematica [C]  time = 0.258771, size = 217, normalized size = 1.42 \[ \frac{-2 \text{RootSum}\left [\text{$\#$1}^3 a+3 \text{$\#$1}^2 a-\text{$\#$1}^3 b+3 \text{$\#$1}^2 b+3 \text{$\#$1} a-3 \text{$\#$1} b+a+b\& ,\frac{\text{$\#$1}^2 a \log \left (\tan ^2\left (\frac{x}{2}\right )-\text{$\#$1}\right )-\text{$\#$1}^2 b \log \left (\tan ^2\left (\frac{x}{2}\right )-\text{$\#$1}\right )+2 \text{$\#$1} a \log \left (\tan ^2\left (\frac{x}{2}\right )-\text{$\#$1}\right )+a \log \left (\tan ^2\left (\frac{x}{2}\right )-\text{$\#$1}\right )+4 \text{$\#$1} b \log \left (\tan ^2\left (\frac{x}{2}\right )-\text{$\#$1}\right )+b \log \left (\tan ^2\left (\frac{x}{2}\right )-\text{$\#$1}\right )}{\text{$\#$1}^2 a-\text{$\#$1}^2 b+2 \text{$\#$1} a+2 \text{$\#$1} b+a-b}\& \right ]+3 \sec ^2(x)+6 \left (\log \left (\sec ^2\left (\frac{x}{2}\right )\right )+\log (\cos (x))\right )}{6 a} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]^3/(a + b*Cos[x]^3),x]

[Out]

(6*(Log[Cos[x]] + Log[Sec[x/2]^2]) - 2*RootSum[a + b + 3*a*#1 - 3*b*#1 + 3*a*#1^2 + 3*b*#1^2 + a*#1^3 - b*#1^3
 & , (a*Log[-#1 + Tan[x/2]^2] + b*Log[-#1 + Tan[x/2]^2] + 2*a*Log[-#1 + Tan[x/2]^2]*#1 + 4*b*Log[-#1 + Tan[x/2
]^2]*#1 + a*Log[-#1 + Tan[x/2]^2]*#1^2 - b*Log[-#1 + Tan[x/2]^2]*#1^2)/(a - b + 2*a*#1 + 2*b*#1 + a*#1^2 - b*#
1^2) & ] + 3*Sec[x]^2)/(6*a)

________________________________________________________________________________________

Maple [A]  time = 0.032, size = 125, normalized size = 0.8 \begin{align*}{\frac{1}{3\,a}\ln \left ( \cos \left ( x \right ) +\sqrt [3]{{\frac{a}{b}}} \right ) \left ({\frac{a}{b}} \right ) ^{-{\frac{2}{3}}}}-{\frac{1}{6\,a}\ln \left ( \left ( \cos \left ( x \right ) \right ) ^{2}-\sqrt [3]{{\frac{a}{b}}}\cos \left ( x \right ) + \left ({\frac{a}{b}} \right ) ^{{\frac{2}{3}}} \right ) \left ({\frac{a}{b}} \right ) ^{-{\frac{2}{3}}}}+{\frac{\sqrt{3}}{3\,a}\arctan \left ({\frac{\sqrt{3}}{3} \left ( 2\,{\cos \left ( x \right ){\frac{1}{\sqrt [3]{{\frac{a}{b}}}}}}-1 \right ) } \right ) \left ({\frac{a}{b}} \right ) ^{-{\frac{2}{3}}}}-{\frac{\ln \left ( a+b \left ( \cos \left ( x \right ) \right ) ^{3} \right ) }{3\,a}}+{\frac{\ln \left ( \cos \left ( x \right ) \right ) }{a}}+{\frac{1}{2\,a \left ( \cos \left ( x \right ) \right ) ^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^3/(a+b*cos(x)^3),x)

[Out]

1/3/a/(1/b*a)^(2/3)*ln(cos(x)+(1/b*a)^(1/3))-1/6/a/(1/b*a)^(2/3)*ln(cos(x)^2-(1/b*a)^(1/3)*cos(x)+(1/b*a)^(2/3
))+1/3/a/(1/b*a)^(2/3)*3^(1/2)*arctan(1/3*3^(1/2)*(2/(1/b*a)^(1/3)*cos(x)-1))-1/3*ln(a+b*cos(x)^3)/a+ln(cos(x)
)/a+1/2/a/cos(x)^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)^3/(a+b*cos(x)^3),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)^3/(a+b*cos(x)^3),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)**3/(a+b*cos(x)**3),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.20408, size = 193, normalized size = 1.26 \begin{align*} -\frac{b \left (-\frac{a}{b}\right )^{\frac{1}{3}} \log \left ({\left | -\left (-\frac{a}{b}\right )^{\frac{1}{3}} + \cos \left (x\right ) \right |}\right )}{3 \, a^{2}} - \frac{\log \left ({\left | b \cos \left (x\right )^{3} + a \right |}\right )}{3 \, a} + \frac{\log \left ({\left | \cos \left (x\right ) \right |}\right )}{a} + \frac{\sqrt{3} \left (-a b^{2}\right )^{\frac{1}{3}} \arctan \left (\frac{\sqrt{3}{\left (\left (-\frac{a}{b}\right )^{\frac{1}{3}} + 2 \, \cos \left (x\right )\right )}}{3 \, \left (-\frac{a}{b}\right )^{\frac{1}{3}}}\right )}{3 \, a^{2}} + \frac{\left (-a b^{2}\right )^{\frac{1}{3}} \log \left (\cos \left (x\right )^{2} + \left (-\frac{a}{b}\right )^{\frac{1}{3}} \cos \left (x\right ) + \left (-\frac{a}{b}\right )^{\frac{2}{3}}\right )}{6 \, a^{2}} + \frac{1}{2 \, a \cos \left (x\right )^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)^3/(a+b*cos(x)^3),x, algorithm="giac")

[Out]

-1/3*b*(-a/b)^(1/3)*log(abs(-(-a/b)^(1/3) + cos(x)))/a^2 - 1/3*log(abs(b*cos(x)^3 + a))/a + log(abs(cos(x)))/a
 + 1/3*sqrt(3)*(-a*b^2)^(1/3)*arctan(1/3*sqrt(3)*((-a/b)^(1/3) + 2*cos(x))/(-a/b)^(1/3))/a^2 + 1/6*(-a*b^2)^(1
/3)*log(cos(x)^2 + (-a/b)^(1/3)*cos(x) + (-a/b)^(2/3))/a^2 + 1/2/(a*cos(x)^2)